package kr.co.doriclassic.pro12;

public class TwoDimShape extends Shape {
	@Override
	public void getArea() {
		System.out.print("2차원 ");
	}	
}
class Ellipse extends TwoDimShape{
	private int redius;
	static final double PI=3.14;
	
	public Ellipse(int redius) {
		this.redius = redius;
	}	
	
	@Override
	public void getArea() {
		super.getArea();
		System.out.println("원의 넓이="+(PI*redius*redius));
	}
}
class Rectangle extends TwoDimShape{
	private int width;
	private int height;
	
	public Rectangle(int width, int height) {
		this.width = width;
		this.height = height;
	}

	@Override
	public void getArea() {
		super.getArea();
		System.out.println("사각형의 넓이="+(width*height));
	}
}
class Triangle extends TwoDimShape{
	private int side;
	private int height;
		public Triangle(int side, int height) {
		this.side = side;
		this.height = height;
	}


	@Override
	public void getArea() {
		super.getArea();
		System.out.println("삼각형의 넓이="+(side*height/2));
	}
}